package cn.zqy.demo.day07;

import java.util.Scanner;

public class Demo03ScannerMax {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("1:");
        int a = sc.nextInt();
        System.out.println("2:");
        int b = sc.nextInt();
        System.out.println("3:");
        int c = sc.nextInt();
        int max = maxInt(a,b,c);
        System.out.println("最大值：" + max);

    }
    private static int maxInt(int a, int b, int c) {
        int max;
        max = a > b ? a : b;
        max = max > c ? max : c;
        return max;
    }
}
